package com.billing.model.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.billing.model.entity.Message;
import com.billing.model.entity.MessageAppBean;
import com.billing.model.entity.TUser;

/**
 * @author Administrator
 *
 */
public interface MessageMapper {

	/**
	 * @param title
	 * @param cont
	 * @param organizationid
	 * @param currentPage
	 * @param pageSize
	 * @return
	 */
	public List<Message> selectmessgeList(@Param("title") String title,
			@Param("cont") String cont, @Param("status") String status,
			@Param("startDate") String startDate,
			@Param("endDate") String endDate,
			@Param("organizationid") int organizationid,
			@Param("currentPage") int currentPage,
			@Param("pageSize") int pageSize);

	/**
	 * @param title
	 * @param cont
	 * @param organizationid
	 * @return
	 */
	public int selectmessgeNum(@Param("title") String title,
			@Param("cont") String cont,
			@Param("organizationid") int organizationid);
	
	/**
	 * 根据登录用户ID获取对应的信息
	 * @param name
	 * @return
	 */
	//public List<MessageAppBean> selMessageId(@Param("userid")String userid,@Param("startRow")int startRow,@Param("pageSize") int pageSize);
	public List<MessageAppBean> selMessageId(@Param("startRow")int startRow,@Param("pageSize") int pageSize);
	
	/**
	 * 根据登录用户ID获取未读消息
	 * @param name
	 * @return
	 */
	public List<MessageAppBean> selUnreadMessageId(@Param("userid")String userid,@Param("startRow")int startRow,@Param("pageSize") int pageSize);
	
	/**
	 * @param title
	 * @param cont
	 * @param organizationid
	 * @return
	 */
	public int InterfaceNum();
	
	/**
	 * @param title
	 * @param cont
	 * @param organizationid
	 * @return
	 */
	public int selUnreadNum(@Param("userid")String userid);
	
	/**
	 * 根据登录用户ID获取对应的单个详细信息
	 * @param name
	 * @return
	 */
	//public Message selMessagebyId(@Param("id")String id,@Param("userid")String userid);
	public Message selMessagebyId(@Param("id")String id);

	/**
	 * 新增消息信息
	 * 
	 * @param shift
	 * @return
	 */
	public int insertMessage(Message message);

	/**
	 * 根据ID获取信息
	 * 
	 * @param name
	 * @return
	 */
	public Message selectmessgebyId(@Param("id") String id);

	/**
	 * 修改消息信息
	 * 
	 * @param attendance
	 * @return
	 */
	public int updateMessage(Message message);
	
	
	public int updatereadtype(Message message);

	/**
	 * 删除消息信息
	 * 
	 * @param coding
	 * @return
	 */
	public int deleteMessage(@Param("id") String id);

	public int examineMessage(@Param("id") String id);

	/**
	 * @return
	 * 审核详情数据
	 */
	public List<Message> selectexamine();
	
	/**
	 * 审核消息信息
	 * 
	 * @param shift
	 * @return
	 */
	public int AuditData(Message message);
	
	/**
	 * @param id
	 * @return
	 * 提交到回收站
	 */
	public int modifyState(@Param("id") String id);
	
	/**
	 * @return
	 * 回收站详情数据
	 */
	/*public List<Message> selrecyclebin(@Param("organizationid") int organizationid,
			@Param("currentPage") int currentPage,
			@Param("pageSize") int pageSize);*/
	
	public List<Message> selrecyclebin();
	/**
	 * @param title
	 * @param cont
	 * @param organizationid
	 * @return
	 */
	public int selrecyclebinNum(@Param("organizationid") int organizationid);
	
	/**
	 * @param id
	 * @return
	 * 退回数据
	 */
	public int ReturnMessage(@Param("id") String id);
	
	/**
	 * 根据用户id删除消息信息
	 * @param id
	 * @return
	 */
	public int deleteMessageByid(@Param("id")int id);
}
